package xiegd.study.design.xiangyuan;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: xieguangda
 * @Description:
 * @Date: 2023/12/1 16:10
 */
public class ChessBoard2 {
    private Map<Integer, ChessPiece2> chessPieces = new HashMap<>();

    public ChessBoard2() {
        init();
    }

    private void init() {
        chessPieces.put(1, new ChessPiece2(
                ChessPieceUnitFactory.getChessPiece(1), 0,0));
        chessPieces.put(1, new ChessPiece2(
                ChessPieceUnitFactory.getChessPiece(2), 1,0));
        //...省略摆放其他棋子的代码...
    }

    public void move(int chessPieceId, int toPositionX, int toPositionY) {
        //...省略...
    }
}
